package com.cxl.entity;


import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class User implements Serializable {

  private Integer uid;
  private String username;
  private String password;
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date enddate;
  private Integer role;


  @Override
  public String toString() {
    return "User{" +
            "uid=" + uid +
            ", username='" + username + '\'' +
            ", password='" + password + '\'' +
            ", enddate=" + enddate +
            ", role=" + role +
            '}';
  }

  public Integer getUid() {
    return uid;
  }

  public void setUid(Integer uid) {
    this.uid = uid;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public Date getEnddate() {
    return enddate;
  }

  public void setEnddate(Date enddate) {
    this.enddate = enddate;
  }

  public Integer getRole() {
    return role;
  }

  public void setRole(Integer role) {
    this.role = role;
  }

  public User() {
  }

  public User(Integer uid, String username, String password, Date enddate, Integer role) {
    this.uid = uid;
    this.username = username;
    this.password = password;
    this.enddate = enddate;
    this.role = role;
  }
}
